var e = require("./mini-redux/index"),
  n = require("./component-page/index"),
  t = require("./request/index"),
  o = require("./extend-page/index"),
  r = require("./utils/index"),
  u = require("../utils/index").helper.share,
  i = Page,
  g = Component,
  s = function (n) {
    return n.useStore ? i((0, e.connectPage)(n.useStore, n.shouldComponentUpdate)(n)) : i(n)
  },
  a = function (n) {
    return n.useStore ? g((0, e.connect)(n.useStore, n.shouldComponentUpdate)(n)) : g(n)
  };
Page = (0, o.pageExtend)((function (e) {
  return e.componentPage ? s((0, n.publishPage)(e.componentPage)(e)) : s(e)
}), {
  onShareAppMessageCb: function (e) {
    var n;
    return "button" == e.from && "invite-type" == (null === (n = e.target) || void 0 === n ? void 0 : n.id) ? u.getShareInfo(3) : "/pages/index/index" == "/".concat($.getCurrentPage().route) ? u.getShareInfo(2) : u.getShareInfo()
  }
}), Component = function (e) {
  return e.componentPage ? a((0, n.subscribeComponent)(e.componentPage)(e)) : a(e)
}, globalThis.$ = {
  request: t.request,
  wait: r.wait,
  msg: r.msg,
  showModal: r.showModal,
  alert: r.alert,
  confirm: r.confirm,
  jxAlert: r.jxAlert,
  getCurrentPage: r.getCurrentPage,
  router: r.router,
  getMenuButtonBoundingClientRect: r.getMenuButtonBoundingClientRect,
  getIndex: r.getIndex,
  getSystemInfoSync: r.getSystemInfoSync,
  getCommonSystemInfo: r.getCommonSystemInfo,
  selectComponent: r.selectComponent,
  isIos: r.isIos
};